package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.entity.BargainActivity;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.Date;import java.util.List;

@Mapper
public interface BargainActivityMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BargainActivity record);

    int insertSelective(BargainActivity record);

    BargainActivity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BargainActivity record);

    int updateByPrimaryKey(BargainActivity record);

    List<BargainActivity> findAllPage(PageReq req);

    List<BargainActivity> findAllByIds(@Param("ids") List<Long> ids);

    List<BargainActivity> findThreeByShopIdAndStatus(@Param("shopId") Long shopId, @Param("status") Byte status, @Param("now") Date now);

    int updateDeletedAndStatusById(@Param("updatedDeleted")Byte updatedDeleted,@Param("updatedStatus")Byte updatedStatus,@Param("id")Long id);

    List<BargainActivity> findAllByEndTimeAndStatus(@Param("endTime")Date endTime,@Param("status")Byte status);

    int updateStatusByEndTimeAndStatus(@Param("updatedStatus")Byte updatedStatus,@Param("endTime")Date endTime,@Param("status")Byte status);




}